-
-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restrict css-minimizer-webpack-plugin version in the generator unless using Node v18+ #1598
Restrict css-minimizer-webpack-plugin version in the generator unless using Node v18+ #1598
Conversation
css-minimizer-webpack-plugin v6.0.0 requires Node 18+ https://github.com/webpack-contrib/css-minimizer-webpack-plugin/releases/tag/v6.0.0
@@ -91,7 +91,8 @@ def add_yarn_dependencies | |||
babel-plugin-macros" | |||
|
|||
puts "Adding CSS handlers" | |||
run "yarn add css-loader css-minimizer-webpack-plugin mini-css-extract-plugin style-loader" | |||
# css-minimizer-webpack-plugin v6.0.0 requires Node 18+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is 100% the wrong thing to do. We should not be doing things like this to fix testing...Instead, just take Node 16 out of the test matrix.
We're not requiring an update to Node. Node 16 should still work with React on Rails.
Please confirm that the error is easy to debug if somebody uses the generator with old Node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahangarha you could actually make the version of css-minimizer-webpack-plugin
installed conditional on the version of node
that is being used.
Have the generator check the result of node -v
& then install the latest version of css-minimizer-webpack-plugin
compatible with that node
version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds better 👍🏾
I close this PR regarding this comment. The required change is applied in #1592 |
Summary
Recently
css-minimizer-webpack-plugin
released v6.0.0 in which the minimum required Node version is 18.We install this package in our generator, and we need this PR to ensure our generator doesn't break in an environment with an older Node.
Alternatively, we can bump our Nodejs support to v18 (the current LTS)I have change the generator so that it limits the version of this package unless we use Node v18+.
Pull Request checklist
Add/update test to cover these changesUpdate documentationUpdate CHANGELOG fileOther Information
This change is